package cn.edu.scau.cmi.linkaibo.adapter;
import java.util.*;

public class Student {
    private int id;
    private String name;
    public Student() {
    	
    }
    public Student(int id,String name) {
    	this.id=id;
    	this.name=name;
    }
    public void sortStudent(List<Integer> intList,List<Student> students) {
    	for(int x=0; x<intList.size(); x++) {
    		int t=intList.get(x);
    		Student stu=students.get(x);
    		for(int i=x; i<students.size(); i++) {
    			
    			if(students.get(i).getId()==t) {
    				students.set(x, students.get(i));
    				students.set(i, stu);
    				break;
    			}
    		}
    	}
    }
    public void setId(int id) {
    	this.id=id;
    }
    public void setName(String name) {
    	this.name=name;
    }
   public int getId() {
	   return id;
   }
   public String getName() {
	   return name;
   }
} 